package br.ufal.tci.nexos.arcolive.service.connection.command;

import br.ufal.tci.nexos.arcolive.command.ArCoLIVEServerCommand;
import br.ufal.tci.nexos.arcolive.participant.ArCoLIVEParticipant;
import br.ufal.tci.nexos.arcolive.protocol.ArCoLIVEConnectionProtocol;

public class SendInvalidCommandCommand extends ArCoLIVEServerCommand {

	private String command = "";
	
	public SendInvalidCommandCommand(ArCoLIVEParticipant participant, String command) {
		super(participant);
		this.command = command;
	}

	public void execute() {

		String response = ArCoLIVEConnectionProtocol.ID + "#command=" + this.command + "#response=" + ArCoLIVEConnectionProtocol.INVALID_COMMAND + "#cause=802";
		super.participant.getConnectionService().getConnection().sendMessage(response);

	}

}